-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: split up pandas/tests/indexing/test_multiindex.py #23912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello @simonjayhawkins! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23912 +/- ##
=======================================
Coverage 92.31% 92.31%
=======================================
Files 161 161
Lines 51513 51513
=======================================
Hits 47554 47554
Misses 3959 3959
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, some small splitting. ping on green.
with catch_warnings(record=True): | ||
df.ix[name, 'new_col'] = new_vals | ||
|
||
def test_multiindex_label_slicing_with_negative_step(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to slicing
columns=['Test'], index=range(30, 71)) | ||
tm.assert_frame_equal(result, expected) | ||
|
||
def test_multiindex_symmetric_difference(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move to (new file set_ops)
expected = df.loc[2000, 1, 6][['A', 'B', 'C']] | ||
tm.assert_series_equal(result, expected) | ||
|
||
def test_get_loc_single_level(self, single_level_multiindex): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some loc tests in here
tm.assert_frame_equal(result, expected) | ||
tm.assert_frame_equal(result, result2) | ||
|
||
def test_getitem_setitem_slice_integers(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move pure getitem tests to a new file, and pure setitem to a newfile as well, if they are both getitem & setitem, put in the setitem one
frame.loc[('bar', 'three'), 'B'] = 0 | ||
assert frame.sort_index().loc[('bar', 'three'), 'B'] == 0 | ||
|
||
def test_int_series_slicing( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to slicing
expected = expected.rename(('routine1', 'result1')) | ||
tm.assert_series_equal(result, expected) | ||
|
||
def test_mixed_depth_insert(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insert, difference to set_ops
@jreback green! |
thanks! |
git diff upstream/master -u -- "*.py" | flake8 --diff
only whole tests moved, tests have not been split up. this and the removal of classes is left for a follow-on PR.